
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <html>
    <head>
        <title>商城首页</title>
        <link rel="stylesheet" type="text/css" href="css/public.css"/>
        <link rel="stylesheet" type="text/css" href="css/shouye.css"/>
        <link rel="stylesheet" type="text/css" href="css/first.css"/>
        <script src="js/jquery-3.6.0.js" type="text/javascript" charset="utf-8"></script>
        <script src="js/front_page.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
    <%String user_id = request.getParameter("user_id");%>
    <div class="head">
        <div class="head_zi">
            <div class="car">
                <a href="GotoCarServlet"><img src="images/购物车.png" height="28px">
                    <span>购物车</span>
                </a>
            </div>
            <div class="login">
                <div><a href="GotoOrderServlet">订单管理</a></div>
                <div><a href="index.jsp">登录</a></div>
                <div><a href="index.jsp">注册</a></div>
            </div>

        </div>
    </div>
    <!--搜索框-->
    <div class="search_kuang">
        <div class="search">
            <form action="goods.do" method="post">
                <input type="text" class="text" name="goods" placeholder="请输入商品名称进行搜索">
                <button><img src="images/搜索图标.png" width="40px"></button>
            </form>
        </div>
    </div>
    <div class="shop">
        <div class="lunbo" >
            <span class="right" id="right"></span>
            <span class="left" id="left"></span>
            <div id="lunbo" >
                <div>
                    <a href="#"><img src="images/mi11.png" ></a>
                </div>
                <div>
                    <a href="#"><img src="images/pingban5.png" ></a>
                </div>
                <div>
                    <a href="#"><img src="images/450ebe4e2420eba7064b6ce08b2fc503.jpg"></a>
                </div>
                <div>
                    <a href="#"><img src="images/3e34ddd6b7bcbfb90ed09e871d291593.png" ></a>
                </div>
                <div>
                    <a href="#"><img src="images/f89261d8655d76f2ab2340e4a3738678.jpg"></a>
                </div>
            </div>
        </div>
        </div>
    <%--表单遍历--%>
    <div style="width: 1100px; margin: 10px auto; border: 1px solid #ccc; padding: 10px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);">
        <table class="biao" style="width: 100%; border-collapse: collapse;">
            <tr style="background-color: #f2f2f2; text-align: center;">
                <th style="padding: 10px;">商品图片</th>
                <th style="padding: 10px;">商品信息</th>
                <th style="padding: 10px;">类别</th>
                <th style="padding: 10px;">商品价格</th>
                <th style="padding: 10px;">加入购物车</th>
                <th style="padding: 10px;">购买</th>
            </tr>
            <c:forEach items="${goods}" var="good">
                <tr style="text-align: center;">
                    <td style="padding: 10px;">
                        <a href="FindGoodsMsgServlet?good_id=${good.goodsid}">
                            <img src="images/${good.goodspic}" style="max-width: 150px; height: auto;">
                        </a>
                    </td>
                    <td style="padding: 10px;">${good.supplier}</td>
                    <td style="padding: 10px;">
                        <c:if test="${good.typeid==1}">手机</c:if>
                        <c:if test="${good.typeid==2}">电脑</c:if>
                        <c:if test="${good.typeid==3}">服装</c:if>
                    </td>
                    <td style="padding: 10px;">${good.goodsprice}元</td>
                    <td style="padding: 10px;"><a href="AddCarServlet?goods_pic=${good.goodspic}&goods_price=${good.goodsprice}"><img src="images/购物车.png" style="max-width: 50px;"></a></td>
                    <td style="padding: 10px;"><a href="#"><img src="images/搜索图标.png" width="20px" height="20px;"></a></td>
                </tr>
            </c:forEach>
        </table>
    </div>
    </div>

    <div class="footer">
        <div class="translate">
            <div class="footer-links">
                <h5>购物指南</h5>
                <ul>
                    <li><a href="#">购物流程</a></li>
                    <li><a href="#">会员介绍</a></li>
                    <li><a href="#">生活旅行</a></li>
                    <li><a href="#">常见问题</a></li>
                    <li><a href="#">联系客服</a></li>
                </ul>
            </div>
            <div class="footer-links">
                <h5>支付方式</h5>
                <ul>
                    <li><a href="#">信用卡</a></li>
                    <li><a href="#">货到付款</a></li>
                    <li><a href="#">在线付款</a></li>
                    <li><a href="#">分期付款</a></li>
                </ul>
            </div>
            <div class="footer-links">
                <h5>售后服务</h5>
                <ul>
                    <li><a href="#">售后政策</a></li>
                    <li><a href="#">退款说明</a></li>
                    <li><a href="#">返修/退换货</a></li>
                </ul>
            </div>
            <div class="footer-links">
                <h5>帮助中心</h5>
                <ul>
                    <li><a href="#">账户管理</a></li>
                    <li><a href="#">自助服务</a></li>
                    <li><a href="#">订单操作</a></li>
                    <li><a href="#">服务网点</a></li>
                    <li><a href="#">授权体验店/专区</a></li>
                </ul>
            </div>
            <div class="footer-links">
                <h5>关于我们</h5>
                <ul>
                    <li><a href="#">新浪微博</a></li>
                    <li><a href="#">官方微信</a></li>
                    <li><a href="#">联系我们</a></li>
                    <li><a href="#">加入我们</a></li>
                    <li><a href="#">公益基金会</a></li>
                </ul>
            </div>
        </div>
    </div>
    </body>
    </html>
